package com.purchase.ml.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_order_detail")
@ApiModel(value = "SysOrderDetail", description = "订单详情表")
public class SysOrderDetail implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    @TableField(value = "oid")
    @ApiModelProperty(value = "")
    private Long oid;

    @TableField(value = "product_id")
    @ApiModelProperty(value = "")
    private Long productId;

    /**
     * 商品数量
     */
    @TableField(value = "quantity")
    @ApiModelProperty(value = "商品数量")
    private Integer quantity;

    /**
     * 商品总价
     */
    @TableField(value = "allmoney")
    @ApiModelProperty(value = "商品总价")
    private BigDecimal allmoney;

    /**
     * 商品总价
     */
    @TableField(value = "price")
    @ApiModelProperty(value = "商品单价")
    private BigDecimal price;

    @TableField(value = "buyunit")
    @ApiModelProperty(value = "购买单位")
    private String buyunit;


    @TableField(exist = false)
    @ApiModelProperty(value = "商品图片")
    private String picUrl;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品名称")
    private String productName;

    private static final long serialVersionUID = 1L;
}